package com.cn.yunhe.struts.controller;

import java.io.IOException;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts2.ServletActionContext;
import com.opensymphony.xwork2.ActionSupport;

public class CarController extends ActionSupport{
	
	private static final long serialVersionUID = 1L;

	public String queryCars() throws IOException{
		
		System.out.println("从数据库查询车辆列表！");
		
		HttpServletResponse response = ServletActionContext.getResponse();
		
		response.setContentType("text/html;charset=utf-8");
		response.getWriter().print("从数据库查询车辆列表！");
		
		return SUCCESS;
	}
	
	public String queryCars2() throws IOException{
		
		System.out.println("从数据库查询车辆列表！");
		
		HttpServletResponse response = ServletActionContext.getResponse();
		
		response.setContentType("text/html;charset=utf-8");
		response.getWriter().print("2222222222222！");
		
		return SUCCESS;
	}
	
	public String queryCars3() throws IOException{
		
		System.out.println("从数据库查询车辆列表！");
		
		HttpServletResponse response = ServletActionContext.getResponse();
		
		response.setContentType("text/html;charset=utf-8");
		response.getWriter().print("3333333333333！");
		
		return SUCCESS;
	}

}
